package com.xm.shop.pojo.entity;

import java.math.BigDecimal;

/**
 * @author ludi
 * @date:2020/9/1 10:33
 * @description:购物车转订单类
 */
public class Item {
    private Integer itemId;
    private Integer productId;
    private Product product;//商品对象
    private Integer orderId;
    private BigDecimal itemNum;
    private BigDecimal itemTotalPrice;

    public Item() {
    }

    public Item(Integer itemId, Integer productId, Product product, Integer orderId,
                BigDecimal itemNum, BigDecimal itemTotalPrice) {
        this.itemId = itemId;
        this.productId = productId;
        this.product = product;
        this.orderId = orderId;
        this.itemNum = itemNum;
        this.itemTotalPrice = itemTotalPrice;
    }

    public Integer getItemId() {
        return itemId;
    }

    public void setItemId(Integer itemId) {
        this.itemId = itemId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public BigDecimal getItemNum() {
        return itemNum;
    }

    public void setItemNum(BigDecimal itemNum) {
        this.itemNum = itemNum;
    }

    public BigDecimal getItemTotalPrice() {
        return itemTotalPrice;
    }

    public void setItemTotalPrice(BigDecimal itemTotalPrice) {
        this.itemTotalPrice = itemTotalPrice;
    }

    @Override
    public String toString() {
        return "Item{" +
                "itemId=" + itemId +
                ", productId=" + productId +
                ", product=" + product +
                ", orderId=" + orderId +
                ", itemNum=" + itemNum +
                ", itemTotalPrice=" + itemTotalPrice +
                '}';
    }
}
